/**
 * @license
 * Cesium - https://github.com/CesiumGS/cesium
 * Version 1.99
 *
 * Copyright 2011-2022 Cesium Contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Columbus View (Pat. Pend.)
 *
 * Portions licensed separately.
 * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
 */
define((function(){"use strict";return class{constructor(){}static getHeaderArray(t){let r=[];for(let n=0;n<t;n++)r[n]=this._getRandomNum();return r}static _getRandomNum(){let t=Math.random();return 50+Math.round(80*t)}static stringToByte(t,r){void 0===r&&(r="utf8");let n=[],e=Buffer.from(t,r);for(let t=0;t<e.length;t++)n.push(e[t]);return n}static byteToString(t,r){return void 0===r&&(r="utf8"),Buffer.from(t).toString(r)}static intToBytes(t){return[t>>24&255,t>>16&255,t>>8&255,255&t]}static bytesToInt(t){return t[0]<<24|t[1]<<16|t[2]<<8|t[3]}static varintToInt(t){let r=[],n=[],e=3,i=0;for(let o=t.length-1;o>=0&&(n[0]=o-1>=0?t[o-1]<<7-i:0,-1!==e);o--)r[e]=(127&t[o])>>i|n[0],e--,i++;let o=r[0]<<24&4278190080|r[1]<<16&16711680|r[2]<<8&65280|255&r[3];return o=o>>1^-(1&o),o}static intToVarint(t){if(0===t)return[0];t=this._zigZagEncoding(t);let r,n=[],e=0;for(let i=5;i>0;i--)r=t>>7*(i-1)&127,0!==e&&(r|=128),0!==r&&n.push(r),e=r;return n}static varintToIntArray(t){let r,n=[],e=0,i=[];for(let o=0;o<t.length;o++)r=0|t[o]>>7&1,0===r&&e>0&&e<=5&&(i.push(this.varintToInt(n)),n=[],e=0),n.push(t[o]),e++;return i.push(this.varintToInt(n)),i}static intArrayToVarintBuffer(t){let r,n=[];for(let e=0;e<t.length;e++)r=this.intToVarint(t[e]),n.push(...r);return Buffer.from(n)}static _zigZagEncoding(t){return t>>31^t<<1}}}));
